package org.mikeliu.exp2.homework1;

import java.util.Scanner;

class Rectangle
{
	private double width;
	private double height;
	public Rectangle() 
	{
		width=1;
		height=1;
	}
	public Rectangle(double width,double height)
	{
		this.width=width;
		this.height=height;
	}
	public double getArea()
	{
		return width*height;
	}
	public double getPerimeter()
	{
		return 2*(width+height);
	}
	
}

public class Homework1 {
	public static void main(String[] args) {
	    Scanner input = new Scanner(System.in);

	    double w = input.nextDouble();
	    double h = input.nextDouble();
	    Rectangle myRectangle = new Rectangle(w, h);
	    System.out.println(myRectangle.getArea());
	    System.out.println(myRectangle.getPerimeter());

	    input.close();
	  }
}
